/*  ----------------------------------------------------------------------------
 *  Arello Mobile
 *  Fast 3d Engine
 *  ----------------------------------------------------------------------------
 * Except where otherwise noted, this work is licensed under
 * http://creativecommons.org/licenses/by/3.0
 */

#ifndef __TEXTSTREAMSTRING_H__
#define __TEXTSTREAMSTRING_H__

#include <string>
#include "TextStream.h"

namespace liba
{
namespace textstream
{

template<class Sym>
class String : public TextOStream<Sym>
{
	std::basic_string<Sym> str;
public:
	virtual void print(const Sym * begin, const Sym * end)
	{
		str.append( begin, end );
	}
	virtual void flush()
	{}
	const std::basic_string<Sym> & get_string()const
	{
		return str;
	}
	void clear()
	{
		str.clear();
	}
};

} // namespace textstream
} // namespace liba

using namespace liba;


#endif //__TEXTSTREAMSTRING_H__